<?php

use Illuminate\Http\Request;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

//Route::middleware('auth:api')->get('/user', function (Request $request) {
//    return $request->user();
//});

Route::prefix('api')->group(function(){
    //热门文章
    Route::get('hotartical','Home\ApiController@hotartical');
    //最新发布
    Route::get('newarrival','Home\ApiController@newarrival');
    //获取留言messageAll
    Route::any('message','Home\ApiController@message');
    Route::any('messageAll','Home\ApiController@messageAll');
    //获取分类对应的文章
    Route::any('artical','Home\ApiController@artical');
    //相册分类
    Route::get('photocate','Home\ApiController@photocate');
    //图片库中的全部图片
    Route::get('photo','Home\ApiController@allphoto');
    // //留言
    // Route::any('leavemessage','Home\ApiController@leavemessage');
    //博文详情
    Route::any('detail','Home\ApiController@detail');

    //登录注册
    // Route::any('login','Home\ApiController@login');
    // Route::any('register','Home\ApiController@register');
});
